package com.guangyunl.e_constructor;

public class Test01 {
    public static void main(String[] args) {
        // 调用无参构造
        Person person = new Person();
        person.setName("李四");
        person.setAge(23);
        System.out.println(person.getName() + "今年" + person.getAge() + "岁");
        // 调用有参构造
        Person person2 = new Person("张三", 22);

        System.out.println("person2.getName() = " + person2.getName());
        System.out.println("person2.getAge() = " + person2.getAge());

    }
}
/*
我是无参构造
李四今年23岁
person2.getName() = 张三
person2.getAge() = 22
 */